package com.uzai.common.enums;

/**
 * 账户明细类型
 * @author liuqi
 * @date 2021/8/27 17:19
 * @param
 * @return null
 */
public enum AccDetailTypeEnum {
    REWARD_REGIST(0,"注册奖励"),
    REWARD_INVITE_PARENT(1,"邀请奖励上级"),
    REWARD_INVITE(2,"邀请奖励下级"),
    REWARD_ORDER(3,"购物奖励"),
    REWARD_COMMISSION(4,"提成奖励（未使用）"),
    REWARD_FIRST_QUERY(5,"首次查券奖励"),
    REWARD_FIRST_ORDER(6,"首次下单奖励"),
    TAKE_BALANCE(7,"用户提现"),
    TAKE_BALANCE_REBACK(8,"用户提现驳回"),
    REWARD_ORDER_PARENT(9,"购物奖励上级"),
    REWARD_ORDER_PARENT_PARENT(10,"奖励上上级"),
    REWARD_ORDER_AGENT(11,"奖励代理"),
    REWARD_ORDER_AGENT_PARENT(12,"奖励上级代理"),
    REWARD_ORDER_PARTNER(13,"奖励合伙人"),
    CHANGE_OPERATOR(14,"人为操作"),
    REFUND_AWARD(15,"维权退款"),
    REBATE_REFOUND(33,"追回返利"),
    SIGNIN(16,"签到(预留)"),
    USER_UPGRADE(17,"升级奖励"),
    CONVERT_GOODS(18,"兑换商品"),
    RECEIVING_RESULT(19,"免单收货返"),
    PAYOFF_MOVIE(20,"电影解析"),
    VIDEO_SEARCH(21,"电影搜索"),
    MERGE_ADD(22,"合并新增"),
    MERGE_SUB(23,"合并扣除"),
    TAKE_REWARD(24,"提现奖励"),
    PUB_ORDER_SUB(25,"违规订单扣款"),
    MOVE_MERGE(26,"迁移合并"),
    SYS_OPE(27,"系统调整"),
    IND_CHECK(28,"支付宝验证"),
    REWARD_FIRST_SETTLE(30,"首次收货奖励"),
    REWARD_INVITE_OTHER(31,"邀请额外奖励"),
    RED_BALANCE_REBACK(32,"红包作废并返还"),
    UNKNOWN(99,"99未知(数据迁移不能和新系统匹配)"),
    REWARD_INVITE_AGENT(100,"邀请奖励代理"),
    REWARD_INVITE_PARTNER(101,"邀请奖励合伙人"),
    SUB_WXPUB(102,"关注公众号奖励"),
    INVITE_GROUP(103,"进群"),
    QUIT_GROUP(104,"退群"),
    CHANGE_API(105,"开放接口操作"),
    MARKETING_ORDER_REWARD(106,"下单额外奖励"),
    GROUP_MGR_COMMAND(107, "群管指令操作"),
    GOODS_TLJ_EXCHANGE(108, "商品淘礼金兑换"),
    ;

    private Integer value;
    private String desc;


    public static final int REWARD_REGIST_VAL = 0;
    public static final int REWARD_INVITE_PARENT_VAL = 1;
    public static final int REWARD_INVITE_VAL = 2;
    public static final int REWARD_ORDER_VAL = 3;
    public static final int REWARD_COMMISSION_VAL = 4;
    public static final int REWARD_FIRST_QUERY_VAL = 5;
    public static final int REWARD_FIRST_ORDER_VAL = 6;
    public static final int TAKE_BALANCE_VAL = 7;
    public static final int TAKE_BALANCE_REBACK_VAL = 8;
    public static final int REWARD_ORDER_PARENT_VAL = 9;
    public static final int REWARD_ORDER_PARENT_PARENT_VAL = 10;
    public static final int REWARD_ORDER_AGENT_VAL = 11;
    public static final int REWARD_ORDER_AGENT_PARENT_VAL = 12;
    public static final int REWARD_ORDER_PARTNER_VAL = 13;
    public static final int CHANGE_OPERATOR_VAL = 14;
    public static final int REFUND_AWARD_VAL = 15;
    public static final int REBATE_REFOUND_VAL = 33;
    public static final int SIGNIN_VAL = 16;
    public static final int USER_UPGRADE_VAL = 17;
    public static final int CONVERT_GOODS_VAL = 18;
    public static final int RECEIVING_RESULT_VAL = 19;
    public static final int PAYOFF_MOVIE_VAL = 20;
    public static final int VIDEO_SEARCH_VAL = 21;
    public static final int MERGE_ADD_VAL = 22;
    public static final int MERGE_SUB_VAL = 23;
    public static final int TAKE_REWARD_VAL = 24;
    public static final int PUB_ORDER_SUB_VAL = 25;
    public static final int MOVE_MERGE_VAL = 26;
    public static final int SYS_OPE_VAL = 27;
    public static final int IND_CHECK_VAL = 28;
    public static final int REWARD_FIRST_SETTLE_VAL = 30;
    public static final int REWARD_INVITE_OTHER_VAL = 31;
    public static final int RED_BALANCE_REBACK_VAL = 32;
    public static final int UNKNOWN_VAL = 99;
    public static final int REWARD_INVITE_AGENT_VAL = 100;
    public static final int REWARD_INVITE_PARTNER_VAL = 101;
    public static final int SUB_WXPUB_VAL = 102;
    public static final int INVITE_GROUP_VAL = 103;
    public static final int QUIT_GROUP_VAL = 104;
    public static final int CHANGE_API_VAL = 105;
    public static final int MARKETING_ORDER_REWARD_VAL = 106;
    public static final int GROUP_MGR_COMMAND_VAL = 107;
    public static final int GOODS_TLJ_EXCHANGE_VAL = 108;


    AccDetailTypeEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static AccDetailTypeEnum getById(Integer id) {
        if (id == null) {
            return null;
        }
        for (AccDetailTypeEnum type: AccDetailTypeEnum.values()) {
            if (type.getValue().intValue() == id) {
                return type;
            }
        }
        return null;
    }
}
